package org.jsola.hr.dto.contract;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.contract.constant.EnterpriseSealType;
import org.jsola.contract.constant.SealColor;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.SealExample.*;

/**
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【印章】的参数")
@Data
public class AddSealDTO extends BaseDTO {

    private static final long serialVersionUID = 3090300826151930295L;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = M_NAME_NOT_NULL)
    @Length(max = 255, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_DESCRIPTION, example = E_DESCRIPTION)
    @Length(max = 1000, message = M_DESCRIPTION_MAX)
    private String description;

    @ApiModelProperty(notes = N_COLOR, example = E_COLOR, allowableValues = SealColor.VALUES_STR)
    @Length(max = 30, message = M_COLOR_MAX)
    @Const(constClass = SealColor.class, message = M_COLOR_ENUM_NOT_MATCH)
    private String color;

    @ApiModelProperty(notes = N_SEAL_STRING, example = E_SEAL_STRING)
    @Length(max = 1000, message = M_SEAL_STRING_MAX)
    @NotNull
    private String sealString;

    @ApiModelProperty(notes = N_ENTERPRISE_SEAL_TYPE, example = E_ENTERPRISE_SEAL_TYPE, allowableValues = EnterpriseSealType.VALUES_STR)
    @Length(max = 100, message = M_ENTERPRISE_SEAL_TYPE_MAX)
    @Const(constClass = EnterpriseSealType.class, message = M_ENTERPRISE_SEAL_TYPE_ENUM_NOT_MATCH)
    private String enterpriseSealType;

    @ApiModelProperty(notes = N_TEXT, example = E_TEXT)
    @Length(max = 255, message = M_TEXT_MAX)
    private String text;

    @ApiModelProperty(notes = N_ROUND_TEXT, example = E_ROUND_TEXT)
    @Length(max = 255, message = M_ROUND_TEXT_MAX)
    private String roundText;

    @ApiModelProperty(notes = N_ROW_TEXT, example = E_ROW_TEXT)
    @Length(max = 255, message = M_ROW_TEXT_MAX)
    private String rowText;

    @ApiModelProperty(notes = N_BOTTOM_TEXT, example = E_BOTTOM_TEXT)
    @Length(max = 255, message = M_BOTTOM_TEXT_MAX)
    private String bottomText;

    @ApiModelProperty(notes = "公司id", example = "1")
    @NotNull
    private String companyId;

    @ApiModelProperty(notes = "是否下发")
    private Boolean issue;


}
